<%@ page language="java"
	import="java.util.*,com.cdqidi.mis.vo.LoginUser" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>数字校园系统首页</title>
		<link type="text/css" rel="stylesheet"
			href="http://img.xxt.m-school.cn/wisdom/style/style.css">
		<link type="text/css" rel="stylesheet"
			href=" http://img.xxt.m-school.cn/xxt2/js/lhgdialog.css" />
		<link type="text/css"
			href="http://img.xxt.m-school.cn/xxt2/image/xxt.css" />
		<script language="javascript" type="text/javascript"
			src="http://img.xxt.m-school.cn/wisdom/js/mode.js"></script>
		<script language="javascript" type="text/javascript"
			src="http://img.xxt.m-school.cn/wisdom/js/loading.js"></script>
		<script type="text/javascript" language="javascript"
			src="http://img.xxt.m-school.cn/wisdom/js/txl.js"></script>

		<script type="text/javascript" language="javascript"
			src="http://img.xxt.m-school.cn/wisdom/js/xxt2.js"></script>

		<!-- dwr -->
		<script type='text/javascript'
			src='${pageContext.request.contextPath}/dwr/interface/zjglDwr.js'></script>
		<script type='text/javascript'
			src='${pageContext.request.contextPath}/dwr/engine.js'></script>
		<script type='text/javascript'
			src='${pageContext.request.contextPath}/dwr/util.js'></script>


		<script type="text/javascript">
		
		
		//意见反馈
		function yijian(){
		var content=document.getElementById("content").value;
		if(content.replace(/\s/g,"")==''){
		
		//alert("请输入你的意见!");
			xxtconfirm('','请输入你的意见!');
		
		return false;
		}
		document.getElementById('sub').click();
		}
			//dwr获得教师
			function getTeacher()
			{
			//alert("000");
			zjglDwr.getTeacherObj(showMo);
			//alert("111");
			}
			
			//点击修改个人设置时 给QQ phone，Email赋值
			function showMo(t)
			{
          	//alert("222");

			var phone=document.getElementById("phone");
			var qq=document.getElementById("qq");
			var email=document.getElementById("email");
			if(t!=null){
			phone.value=t.mobile;
			qq.value=t.qq;
			email.value=t.dzxx;
			}
			}
			/*
			//点选上修改密码框时，激活修改密码输入框
			function jih()
			{
			var ym=document.getElementById("yma");
			var ymm=document.getElementById("ymm");//<P>
			var qmm=document.getElementById("qm");//<p>
			var xm=document.getElementById("xma");
			var qm=document.getElementById("qma");
			
			if(document.getElementById("check1").checked){
			ym.disabled=false;
			xm.disabled=false;
			qm.disabled=false;
			ymm.innerHTML="请输入原始密码";
			qmm.innerHTML="";
			//alert(ymm.innerText);
			}
			else{
			ym.value="";
			xm.value="";
			qm.value="";
			ym.disabled=true;
			xm.disabled=true;
			qm.disabled=true;
			ymm.innerHTML="";
			qmm.innerHTML="";
			//alert(ymm.innerText);
			}
			}
			
			
			//获得后台密码
			function getp()
			{
			zjglDwr.getpassword(pand);
			}
			
			//原始密码和输入密码的验证
		function pand(p)
		{
		var ymm=document.getElementById("ymm");
		var ym=document.getElementById("yma");
		var xm=document.getElementById("xma");
		var qm=document.getElementById("qma");
		//alert(document.getElementById("check1").checked);
		if(document.getElementById("check1").checked){
		if(document.getElementById("yma").value!=''){
		if(document.getElementById("yma").value!=p)
		{
		//alert("与原始密码不一致！");
		ymm.innerHTML="原密码不一致";
		document.getElementById("yma").focus();
		}
		else{
		ymm.innerHTML="与原密码一致";
		ym.disabled=true;
		xm.disabled=false;
		xm.focus();
		qm.disabled=false;
		}
		}
		}
		}
		
		//新密码的验证
		function yz()
		{
		var qm=document.getElementById("qm");
		if(document.getElementById("check1").checked){
		if(document.getElementById("xma").value!=''){
		if(document.getElementById("xma").value!=document.getElementById("qma").value)
		{
		//alert("两次输入密码不一致！");
		qm.innerHTML="两次输入不一致";
		document.getElementById("xma").focus();
		return false;
		}
		else
		{
		qm.innerHTML="两次输入一致 !";
		}	
		}
		}
}

*/
    //手机号码验证
   function phones()
   {
    //手机号码的验证
       var phone=document.getElementById("phone");
        if(phone.value!='')
        {
          var mobile=/^((13[0-9]{1})|159|153)+\d{8}$/;
          if(!mobile.test(phone.value))
          {
          alert("请输入有效的手机号码!");
          phone.focus();
          return false;
          }
        }
    }
    function submitForm(){alert('1111111111111');}
   //QQ验证
   function qqh(){
   
        var qq=document.getElementById("qq");
        //alert(qq);
        
        if(qq.value!=''){
       if(isNaN(qq.value))
        {
         alert("请输入正确的QQ号码!");
         qq.focus();
       return false;
        } 
        else if(qq.value.length<5)
        {
         alert("请输入正确的QQ号码!");
          qq.focus();
       return false;
        }
       else if(qq.value.length>12)
       {
       alert("请输入正确的QQ号码!");
        qq.focus();
       return false;
       }
        }
   
   }

//邮件的验证
function emails()
{
 var temp=document.getElementById("email");
        if(temp.value!='')
        {
         var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
         if(!myreg.test(temp.value))
          {
                alert('请输入有效的E_mail!');
                temp.focus();
                return false;
          }
        }

}

//提交表单的验证
function open_suggestion(){
	document.getElementById('bodycov').style.display="";
	document.getElementById('covBg').style.display="";
	var suggestion=document.getElementById('suggestion');
	suggestion.style.display="";
	var bodyh = document.body.clientHeight;
	var bodyw = document.body.clientWidth;
	suggestion.style.top=(bodyh-300)/2+"px";
	suggestion.style.left=(bodyw-500)/2+"px";
}
function closesuggestion(){
	document.getElementById('bodycov').style.display="none";
	document.getElementById('covBg').style.display="none";
	document.getElementById('suggestion').style.display="none";
	document.getElementById('content').value='';
}
function yanz()
{
zjglDwr.getpassword(send);
}

        function send(p)
        {
        //alert(p);
          //手机号码的验证
       var phone=document.getElementById("phone").value;
        if(phone!='')
        {
          var mobile=/^((13[0-9]{1})|159|153)+\d{8}$/;
          if(!mobile.test(phone))
          {
          alert("请输入有效的手机号码!");
          return false;
          }
        }
        //QQ验证
        var qq=document.getElementById("qq").value;
        //alert(qq);
        
        if(qq!=''){
       if(isNaN(qq))
        {
         alert("请输入正确的QQ号码!");
       return false;
        } 
        else if(qq.length<5)
        {
         alert("请输入正确的QQ号码!");
       return false;
        }
       else if(qq.length>12)
       {
       alert("请输入正确的QQ号码!");
       return false;
       }
        }
        //邮件的验证
        var temp=document.getElementById("email").value;
        if(temp!='')
        {
         var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
         if(!myreg.test(temp))
          {
                alert('请输入有效的E_mail!');
                return false;
          }
        }
      /*
         //alert(document.getElementById("check1").checked);
        if(document.getElementById("check1").checked)
        { //alert(document.getElementById("yma").value);
        
        if(document.getElementById("yma").value=='')
        {
         alert("请输入原始密码!");
         return false;
        }
        
         if(document.getElementById("yma").value!=p)
		{
		alert(document.getElementById("yma").value+"___"+p);
		alert("与原始密码不一致!");
		document.getElementById("yma").focus();
		 return false;
		}
		
        if(document.getElementById("xma").value=='')
        {
        alert("请输入新密码!");
         return false;
        }
       if(document.getElementById("qma").value=='')
        { 
         alert("请输入确定密码!");
          return false;
        } 
        if(document.getElementById("xma").value!=document.getElementById("qma").value)
		{
		alert("两次输入密码不一致！");
		document.getElementById("qma").focus();
		return false;
		} 
		
		document.getElementById('submitButton').click();
		alert("密码修改成功,请到首页重新登录!");
        closelistDiv('grsz');
		 }
		 */
        document.getElementById('submitButton').click();
        closelistDiv('grsz');
        //return true;
        }
		window.onerror=function(){return true;}
     </script>


	</head>

	<%
		LoginUser lu = (LoginUser) session.getAttribute("loginUser");
		String uname = lu.getUname();
		String sname = lu.getSname();
		String dname = lu.getDname();
		//教师姓名
		String loginName = lu.getLoginName();//登录名称
		
	%>
	<style>
/*弹出层样式*/
#bodycov {
	height: 100%;
	width: 100%;
	position: absolute;
	left: 0px;
	top: 0px;
	z-index: 3000;
}

#covBg {
	height: 100%;
	width: 100%;
	position: absolute;
	left: 0px;
	top: 0px;
	z-index: 3100;
	background: #000000;
	filter: alpha(opacity =         10);
	-moz-opacity: 0.1;
	opacity: 0.1;
}

#creatdiv {
	background: url(http://img.xxt.m-school.cn/wisdom/images/xxt_creatediv.gif) no-repeat;
	position: absolute;
	width: 412px;
	height: 174px;
	z-index: 4000
}

#creatdiv2 {
	background: url(http://img.xxt.m-school.cn/wisdom/images/xxt_creatediv.gif) no-repeat;
	position: absolute;
	width: 412px;
	height: 174px;
	z-index: 4000
}

#creatdiv3 {
	background: url(http://img.xxt.m-school.cn/wisdom/images/xxt_creatediv.gif) no-repeat;
	position: absolute;
	width: 412px;
	height: 174px;
	z-index: 4000
}

#creatdiv_top {
	font-family: "楷体_GB2312";
	font-size: 14px;
	color: #c65644;
	padding: 7px 0 0 40px;
	height: 20px;
	width: 100%;
	font-weight: bolder;
}

#creatdiv_bot {
	padding: 0 30px 5px 0;
	height: 30px;
}

#creatdiv_bot input {
	background: url(http://img.xxt.m-school.cn/wisdom/images/xxt_creatediv_bot.gif) no-repeat;
	border: none;
	width: 50px;
	height: 18px;
}

#creatdiv_top2 {
	font-family: "楷体_GB2312";
	font-size: 14px;
	color: #c65644;
	padding: 7px 0 0 40px;
	height: 20px;
	width: 100%;
	font-weight: bolder;
}

#creatdiv_bot2 {
	padding: 0 30px 5px 0;
	height: 30px;
}

#creatdiv_bot2 input {
	background: url(http://img.xxt.m-school.cn/wisdom/images/xxt_creatediv_bot.gif) no-repeat;
	border: none;
	width: 50px;
	height: 18px;
	margin: 0 7px 0 7px;
	text-align: center
}

.big_div {
	width: 100%;
	height: 100%;
	background: url(http://img.xxt.m-school.cn/wisdom/images/xxt_main_bg.gif) no-repeat bottom right;
	overflow: auto
}

.big_div2 {
	width: 100%;
	height: 100%;
	overflow: auto
}

.div_table {
	margin: 10px 0 0 10px;
}

buttonLeft {
	background: url(http://img.xxt.m-school.cn/wisdom/images/btl.gif)
		no-repeat;
	width: 3px;
	height: 19px;
	line-height: 19px;
	font-size: 1px;
	overflow: hidden;
}

.buttonCenter a {
	background: url(http://img.xxt.m-school.cn/wisdom/images/btc.gif)
		repeat-x;
	padding: 0 8px 0 8px;
	color: #011c31;
	text-decoration: none;
	display: block;
	line-height: 19px;
	height: 19px;
}

.buttonRight {
	background: url(http://img.xxt.m-school.cn/wisdom/images/btr.gif)
		no-repeat;
	width: 3px;
	height: 19px;
	line-height: 19px;
	font-size: 1px;
	overflow: hidden;
}
</style>
	<body class="mainBody" onLoad="fixPNG()">

		<div id="bodycov" style="display: none">
			<iframe scrolling="no" frameborder="0" width="100%" height="100%"
				style="filter: alpha(opacity =         10); z-index: 3000;"></iframe>
		</div>
		<div id="covBg" style="display: none"></div>
		<div id="creatdiv" style="display: none; z-index: 4000;">
		</div>
		<div id="creatdiv2" style="display: none; z-index: 4000;">
			<table cellpadding="0" cellspacing="0" border="0" width="100%"
				height="100%">
				<tr>
					<td width="100%" id="creatdiv_top2"
						onMouseOver="movediv('creatdiv2','creatdiv_top2')"
						onMouseOut="mosout()"></td>
				</tr>
				<tr>
					<td align="center" valign="middle" id="creatdiv_middle2"></td>
				</tr>
				<tr>
					<td id="creatdiv_bot2" align="right">
						<input type="button" value="确&nbsp;定" id='removesomnone'>
						<input type="button" value="取&nbsp;消" onClick="closediv2()">
					</td>
				</tr>
			</table>
		</div>
		<div id="suggestion"
			style="width: 450px; height: 300px; position: absolute; z-index: 3900; display: none">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td class="floatDivTL">
									<img
										src="http://img.xxt.m-school.cn/wisdom/images/floatDivTL.gif"
										width="3" height="27">
								</td>
								<td class="floatDivTC">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td align="left">
												<div class="phoneTitle">
													意见反馈
												</div>
											</td>
											<td align="right">
												<img
													src="http://img.xxt.m-school.cn/wisdom/images/floatDivClose.gif"
													width="9" height="9"
													style="margin-right: 10px; cursor: pointer;" border="0"
													onClick="closesuggestion()">
											</td>
										</tr>
									</table>
								</td>
								<td class="floatDivTR">
									<img
										src="http://img.xxt.m-school.cn/wisdom/images/floatDivTR.gif"
										width="3" height="27">
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<s:form action="suggAction!addSuggestion.action" method="post"
					name="form1">
					<tr>
						<td class="floatBody">
							<table width="100%" height="200" border="0" cellpadding="0"
								cellspacing="0" bgcolor="#FFFFFF">
								<tr>
									<td>

										<textarea name="content" style="width: 100%; height: 200px;"
											id="content">
		 </textarea>


									</td>
								</tr>
								<tr>
									<td align="center" height="30">
										<table border="0" cellpadding="0" cellspacing="0">
											<tr>
												<td class="buttonOut">
													<table width="100%" border="0" cellspacing="0"
														cellpadding="0">
														<tr>
															<td class="buttonLeft"></td>
															<td class="buttonCenter">
																<a onClick="yijian()">确定</a>
																<input type="submit" name="su" id="sub" value="提交" style="display:none;"> 
															</td>
															<td class="buttonRight"></td>
														</tr>
													</table>
												</td>
												<td class="buttonOut">
													<table width="100%" border="0" cellspacing="0"
														cellpadding="0">
														<tr>
															<td class="buttonLeft"></td>
															<td class="buttonCenter">
																<a onClick="closesuggestion()">取消</a>
															</td>
															<td class="buttonRight"></td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</s:form>
			</table>
		</div>
		<table width="100%" height="100%" border="0" cellpadding="0"
			cellspacing="0">
			<tr>
				<td class="topcenter">
					<table width="100%" border="0" cellspacing="0" cellpadding="0"
						class="mainBodyLeft">
						<tr>
							<td class="mainBodyRight">
								<table width="497" border="0" align="left" cellpadding="0"
									cellspacing="0" height="66">
									<tr>
										<td align="left">
											<img src="http://img.xxt.m-school.cn/wisdom/images/logo.png"
												name="logo" id="logo">
										</td>
									</tr>
									<tr>
										<td>
											<marquee direction="left" width="500"
												onMouseOut="this.start()" onMouseOver="this.stop()"
												scrollamount="2" class="userInfo">
												你好：
												<span id="schoolName"><%=uname%></span> 组织：
												<span id="schoolGroup"><%=sname%>(<%=dname%>)</span> 当前用户数：
												<span id="userCount"><%=application.getAttribute("count")%></span>
											</marquee>

										</td>
									</tr>
								</table>
								<table border="0" cellspacing="0" cellpadding="0"
									class="userSetting">



									<tr>
										<!-- 意见反馈 -->
										<td>
											<a onclick="open_suggestion()"><b>意见反馈 </b> </a>
										</td>
										<td>
											<!-- 注销 -->
											<a href="<%=basePath%>logout.action"><img
													src="http://img.xxt.m-school.cn/wisdom/images/loginOutOut.gif"
													width="58" height="17" border="0"
													onMouseOver="this.src='images/loginOutOver.gif'"
													onMouseOut="this.src='images/loginOutOut.gif'"> </a>

										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td align="left" valign="top">
					<table width="100%" height="100%" border="0" cellpadding="0"
						cellspacing="0">
						<tr>
							<td width="175" align="left" valign="top" class="mainMenuRight">
								<table height="100%" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td class="mainMenuTop"></td>
									</tr>
									<tr>
										<td align="left" valign="top" class="mainMenuBg">
											<iframe name="mainMenu" id="mainMenu" frameborder="0"
												scrolling="no" src="menuRightAction.action"></iframe>
										</td>
									</tr>
									<s:if test="rolepermissioninfo.C1_GRSZ== true">
										<tr>
											<td height="40" align="center" valign="middle"
												class="mainMenuBg sysSet">
												<input name="Submit" type="button" value="&nbsp;"
													class="sysSetOut"
													onMouseOver="this.className='sysSetOver';"
													onMouseOut="this.className='sysSetOut';"
													onMouseDown="this.className='sysSetDown'"
													onClick="addListGroup('grsz');getTeacher()" />
											</td>
										</tr>
									</s:if>
									<tr>
										<td class="mainMenuBottom"></td>
									</tr>
								</table>
							</td>
							<td align="left" valign="top" class="mainCov">
								<iframe name="main" id="main" frameborder="0" scrolling="no"
									src="<%=basePath%>page/welcome/menu.jsp"></iframe>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td class="mainBottom">
					<span class="mainBottomLeft">版本：2009&nbsp;&nbsp;&nbsp;V2.0</span>
				</td>
			</tr>
		</table>

		<div id="float_bg">
			<iframe width="100%" height="100%" scrolling="no" frameborder="0"></iframe>
		</div>
		<div id="float_zz"></div>
		<div id="grsz"
			style="width: 400px; display: none; position: absolute; z-index: 5000">
			<s:form action="user!personset.action" method="post">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td class="floatDivTL">
										<img
											src="http://img.xxt.m-school.cn/wisdom/images/floatDivTL.gif"
											width="3" height="27">
									</td>
									<td class="floatDivTC">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td align="left">
													<div class="phoneTitle">
														个人设置中心
													</div>
												</td>
												<td align="right">
													<img
														src="http://img.xxt.m-school.cn/wisdom/images/floatDivClose.gif"
														width="9" height="9"
														style="margin-right: 10px; cursor: pointer;" border="0"
														onClick="closelistDiv('grsz')">

												</td>
											</tr>
										</table>
									</td>
									<td class="floatDivTR">
										<img
											src="http://img.xxt.m-school.cn/wisdom/images/floatDivTR.gif"
											width="3" height="27">
									</td>
								</tr>
							</table>
						</td>
					</tr>



					<tr>
						<td align="left" valign="top" class="floatCenter sfcy">
							<table width="100%" border="0" cellspacing="6" cellpadding="0">
								<tr>
									<td>
										<table width="100%" border="0" cellpadding="0" cellspacing="0"
											class="grszTitle">
											<tr>
												<td align="center">
													<span>登录名：</span><a><%=loginName%></a>
												</td>
												<td align="center">
													<span>真实姓名：</span><a><%=uname%></a>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td>
										<table width="100%" border="0" cellpadding="0" cellspacing="6"
											class="grszJbxx">
											<tr>
												<td align="right" width="100">
													手机号码：
													<br>
												</td>
												<td align="left">
													<input name="phone" type="text" id="phone"
														onchange="phones()">
													<br>
												</td>

											</tr>
											<tr>
												<td align="right">
													ＱＱ号码：
													<br>
												</td>
												<td align="left">
													<input name="qq" type="text" id="qq" onChange="qqh()">
													<br>
												</td>
											</tr>
											<tr>
												<td align="right">
													电子邮件：
													<br>

												</td>
												<td align="left">
													<input name="email" type="text" id="email"
														　onchange="emails()">
													<br>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="center" height="36" class="floatBody">
							<input type="button" name="Submit" id="sub" value="保存"
								onclick="yanz()">
							<input type="submit" id="submitButton" style="display: none;" />


							<input type="button" name="button" value="关闭"
								onClick="closelistDiv('grsz')">
						</td>

					</tr>
				</table>
			</s:form>
		</div>
		<%
		if (null != session.getAttribute("msgs")
				&& !"".equals(session.getAttribute("msgs"))) {
		%>
		<script type="text/javascript">
			
			xxtconfirm('','${sessionScope.msgs}');
		</script>
		<%
			}
			session.removeAttribute("msgs");
		%>
	</body>
</html>













